package com.atguigu.srb.core.mapper;

import com.atguigu.srb.core.entity.UserAccount;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 用户账户 Mapper 接口
 * </p>
 *
 * @author Atguigu
 * @since 2023-06-30
 */
public interface UserAccountMapper extends BaseMapper<UserAccount> {

    void updateAmountByBindCode(@Param("bindCode") String bindCode,@Param("chargeAmt") BigDecimal chargeAmt);

    Integer updateAmountAndFreezeAmountByUserId(@Param("amount")BigDecimal amount, @Param("freezeAmount")BigDecimal freezeAmount,@Param("userId") Long userId,@Param("updateTime") Date updateTime);

    Integer updateAmountAndFreezeAmountByBindCode(@Param("amount")BigDecimal amount, @Param("freezeAmount")BigDecimal freezeAmount,@Param("bindCode") String bindCode,@Param("updateTime") Date updateTime);
}
